import { GBox } from "../../../../../com/mui/containers/GBox";
import { GBoxDirection } from "../../../../../com/mui/containers/globalVariable/GBoxDirection";
import { TrackItem } from "./item/TrackItem";
type int = number;
//class TrackBox
    
    export  class TrackBox /* flash.display.Sprite */
    {
        constructor()
        {
            
            this._gbox = new GBox();
            this._gbox.direction = GBoxDirection.VERTICAL;
            addChild(this._gbox);
            return;
        }

        public get itemNum(): int
        {
            return this._gbox.numChildren;
        }

        public addItem(arg1: Object /* flash.display.DisplayObject */): Object /* flash.display.DisplayObject */
        {
            return this._gbox.addChild(arg1);
        }

        public delItem(arg1: Object /* flash.display.DisplayObject */): Object /* flash.display.DisplayObject */
        {
            return this._gbox.removeChild(arg1);
        }

        public delItemAt(arg1: int): Object /* flash.display.DisplayObject */
        {
            return this._gbox.removeChildAt(arg1);
        }

        public getItemAt(arg1: int): Object /* flash.display.DisplayObject */
        {
            return this._gbox.getChildAt(arg1);
        }

        public swapItem(arg1: Object /* flash.display.DisplayObject */, arg2: Object /* flash.display.DisplayObject */): void
        {
            this._gbox.swapChildren(arg1, arg2);
            return;
        }

        public validateNow(): void
        {
            this._gbox.validateNow();
            return;
        }

        public set layChildChanged(arg1: Boolean)
        {
            this._gbox.layChildChanged = arg1;
            return;
        }

        public /* override */ get height(): number
        {
            var loc4=null;
            var loc1=0;
            var loc2=0;
            var loc3=this._gbox.numChildren;
            while (loc2 < loc3) 
            {
                loc4 = this._gbox.getChildAt(loc2) as TrackItem;
                loc1 = loc1 + loc4.height;
                ++loc2;
            }
            return loc1;
        }

        /* internal */ /* var */_gbox: GBox;
    }
